/**
 * Project trac. Copyright Jun 6, 2012.
 */
package org.mediahouse.trac.model;

/**
 * @author Tin
 * @version %I%, %G%
 * 
 */
public interface Deliverable extends Item {

    /**
     * @author Tin
     * @version %I%, %G%
     * 
     */
    public static enum Status {

        /** The system representation of the "Proposed" deliverable status. */
        PROPOSED(0x00),
        /** The system representation of the "Inactive" deliverable status. */
        INACTIVE(0x01),
        /** The system representation of the "Active" deliverable status. */
        ACTIVE(0x02),
        /** The system representation of the "Cancelled" deliverable status. */
        CANCELLED(0x03),
        /** The system representation of the "Pending" deliverable status. */
        PENDING(0x04);

        private final int code;

        /**
         * @param code
         *            the integer code number of this deliverable status type.
         */
        private Status(final int code) {
            this.code = code;
        }

        /**
         * {@inheritDoc}
         * 
         * @see java.lang.Enum#toString()
         */
        @Override
        public String toString() {
            return super.toString();
        }

        /**
         * @param o
         *            the object to translate into a deliverable status type
         * @return the status type that corresponds to the given object, if any
         * @throws IllegalArgumentException
         *             if the argument is {@code null} or cannot be interpreted
         *             into a deliverable status type.
         * @throws UnsupportedOperationException
         *             Not implemented yet.
         */
        public Status valueOf(final Object o) {
            throw new UnsupportedOperationException("Not implemented yet.");
        }

        /**
         * @return the constant integer code of this status type.
         */
        public int getCode() {
            return this.code;
        }
    }

    /**
     * @return a boolean value indicating whether this deliverable has been
     *         successfully put into the underlying system datastore
     */
    public abstract boolean isPut();

    /**
     * @return the globally unique system reference identifier of this
     *         deliverable.
     */
    public abstract String getId();

    /**
     * @return the non-unique name of this deliverable.
     */
    public abstract Object getName();

    /**
     * @return the status of this deliverable.
     */
    public abstract Object getStatus();

    /**
     * @return the reference ID of the owner of this deliverable.
     */
    public abstract Object getOwner();

    /**
     * @return the reference ID of the designated Quality Assurance for this
     *         deliverable.
     */
    public abstract Object getQA();

    /**
     * @return the due date of this deliverable.
     */
    public abstract Object getDueDate();

    /**
     * @return the textual notes for this deliverable item.
     */
    public abstract Object getTextNotes();

}